package org.jeecg.modules.meter.service.impl;

import org.jeecg.entity.meter.MeterRead;
import org.jeecg.modules.meter.mapper.MeterReadMapper;
import org.jeecg.modules.meter.service.IMeterReadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 读表记录表
 * @Author: jeecg-boot
 * @Date:   2020-11-20
 * @Version: V1.0
 */
@Service
public class MeterReadServiceImpl extends ServiceImpl<MeterReadMapper, MeterRead> implements IMeterReadService {

    @Autowired
    private MeterReadMapper meterReadMapper;

    @Override
    public MeterRead getLastMeterReadByNo(String meterCode) {
        return meterReadMapper.getLastMeterReadByNo(meterCode);
    }

    @Override
    public MeterRead getLastMeterReadByKey(String meterKey) {
        return meterReadMapper.getLastMeterReadByKey(meterKey);
    }

    @Override
    public List<MeterRead> findLastMeterReads( List<String> meterIdList) {
        return meterReadMapper.findLastMeterReads(meterIdList);
    }
}
